<extend name="Public/base" />
<block name="content">								
									
<div id="content">
	<div id="content-header">
		<div id="breadcrumb">
			<a href="{:U('Index/index')}" title="首页" class="tip-bottom"><i class="icon-home"></i> 首页</a> 
			<a href="{:U('ShopGoods/index')}" title="商品管理" class="tip-bottom">商品管理</a> 
			<a href="#" class="current">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<br/>
		<button class="confirm btn btn-danger ajax-post" url="{:U('delGroup')}" target-form="ids">删 除</button>
	</div>
	<div class="container-fluid search-form">
			<form class="m-filter" autocomplete="off">
				<div class="clearfix">
					<a class="pull-left btn btn-success btn-filter-show" id="j-filter-show"><span class="icon-chevron-down"></span></a>
				</div>
				
				<div class="filter-box" id="j-filter-box">
					<!-- 基础信息 -->
					<div class="filter-base filter-group">
						<a class="title"><span class="icon-list"></span> 基础信息</a>
						
						<span class="control-group">
							<select class="form-control" style="width: 180px;" name="merchant_id" id="merchant_id" onchange="change_shop_list(this.value,'{:U('ServiceApi/getShopList')}')">
								<option value=0>选择商户</option>
								<volist name="merchant_list" id="vo">
									<option value='{$vo.merchant_id}'>{$vo.merchant_name|strip_tags}</option>
								</volist>
							</select>
						</span>
						<span class="control-group">
							<select class="form-control" style="width: 150px;" name="shop_id" id="shop_id" onchange="change_goods_category_pid(this.value,'{:U('ServiceApi/getGoodsCategoryPid')}')">
								<option value=0>选择店铺</option>
								<volist name="shop_list" id="vo">
									<option value='{$vo.shop_id}'>{$vo.shop_name|strip_tags}</option>
								</volist>
							</select>
						</span>
						<span class="control-group">
							<select class="form-control" style="width: 150px;" name="goods_category_pid" id="goods_category_pid" onchange="change_goods_category_id(this.value,'{:U('ServiceApi/getGoodsCategoryId')}')">
								<option value=0>选择一级品类</option>
								<volist name="category_list" id="vo">
									<option value='{$vo.goods_category_id}'>{$vo.goods_category_name|strip_tags}</option>
								</volist>
							</select>
						</span>
						<span class="control-group">
							<select class="form-control" style="width: 150px;" name="goods_category_id" id="goods_category_id">
								<option value=0>选择二级品类</option>
								<volist name="goods_category_list" id="vo">
									<option value='{$vo.goods_category_id}'>{$vo.goods_category_name|strip_tags}</option>
								</volist>
							</select>
						</span>
					</div>
					<br />
					<!-- /基础信息 -->
				
					<div class="clearfix btn-group">
						<a class="btn btn-success btn pull-left" id="j-filter-hide" style="margin-left:15px;"><span class="icon-chevron-up"></span></a>
						<button type="button" id="search_button" url="{:U('ShopGoods/groupGoods')}" class="btn btn-primary btn pull-left"><span class="icon-search"></span></button>
					</div>	
				</div>		
			</form>
		</div>
		
	<div class="container-fluid">		
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-content ">
					<notempty name="_list">
						<form id="export-form" method="post" action="" autocomplete="off">
							<table class="table table-bordered table-striped with-check">
								<thead>
									<tr>
										<th width="5%"><input type="checkbox" /></th>
										<th width="5%" nowrap="nowrap">序号</th>
										<th width="20%">更新时间</th>
										<th width="35%">商品名</th>
										<th width="15%">团购价格</th>
										<th width="20%">操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="_list" id="vo">
										<tr>
											<td class="taskStatus"><input type="checkbox" value="{$vo.shop_group_id}" name="ids[]" class="ids"/></td>
											<td class="taskStatus">{$i}</td>
											<td class="taskStatus"><if condition="$vo['update_time'] gt 0">{$vo.update_time|time_format}</td>
											<td class="taskStatus">{$vo.goods_name|htmlspecialchars|msubstr=###,0,30}</td>
											<td class="taskStatus">{$vo.shop_group_price|htmlspecialchars}</td>
											<td class="taskStatus">
												<a href="{:U('editGroup?id='.$vo['goods_id'])}"><i class="icon-edit"></i> 编辑</a>
												<a href="{:U('delGroup?ids='.$vo['shop_group_id'])}" class="ajax-get confirm"><i class="icon-remove"></i> 删除</a>
												
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							<div class="dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi ui-buttonset-multi paging_full_numbers" id="DataTables_Table_0_paginate">
								{$_page}
							</div>
						</form>
					<else/>
						<center>暂无内容</center>
					</notempty>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
$(function (){
	//初始化日期选择器
    $(".datepicker").datetimepicker({
        format: 'yyyy-mm-dd hh:ii:ss',
        autoclose: true,
        todayBtn: true
    });
	
	//条件框
	$("#j-filter-hide").click(function(){
		$("#j-filter-box").fadeOut(300);
		$("#j-filter-show").fadeIn(300);
	});
	$("#j-filter-show").click(function(){
		$("#j-filter-box").fadeIn(300);
		$(this).fadeOut(300);
	});
	
	set_value("merchant_id",'{:(int)I('get.merchant_id')}');
	set_value("shop_id",'{:(int)I('get.shop_id','-1')}');
	set_value("goods_category_pid",'{:(int)I('get.goods_category_pid','-1')}');
	set_value("goods_category_id",'{:(int)I('get.goods_category_id')}');
	
	//新增跳转页面
	$('#add').click(function(){
		window.location.href="{:U('ShopGoods/add')}";
	});
});
//导航高亮
highlight_subnav("{:U('ShopGoods/groupGoods')}");
</script>
</block>